﻿@model Online_Course.Domain.SysUser
@using Online_Course.Web.Apps
@{
    Layout = null;
}

<!DOCTYPE html>

<html>
<head>
    <meta name="viewport" content="width=device-width" />
    <link href="@Url.Content("~/Content/Style/ViewPage.css")" rel="stylesheet" type="text/css" />
    <link href="/Content/Style/style.css" rel="stylesheet" type="text/css" />
    <title>新增用户</title>
</head>
<body>
    <script src="@Url.Content("~/Scripts/jquery-1.4.4.min.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>

    <div class="place">
        <span>位置：</span>
        <ul class="placeul">
            <li><a href="#">用户管理</a></li>
            <li><a href="#">添加用户</a></li>
        </ul>
    </div>
    <div style="padding:8px;" id="staff">
        @using (Html.BeginForm())
        {
            @Html.ValidationSummary(true)
            <p> </p>
            <fieldset style="border: 1px dotted #61B5CF; margin-top: 16px; padding: 10px;">
                <legend style="font: bold 1em Arial, Helvetica, sans-serif; color: #00008B; background-color: #FFFFFF;">用户信息</legend>
                <div class="tools ">
                    <ul class="seachform">
                        <li>@Html.LabelFor(model => model.Name)</li>
                        <li class="scinput">
                            @Html.EditorFor(model => model.Name)
                            @Html.ValidationMessageFor(model => model.Name)
                        </li>
                    </ul>
                </div>

                <div class="tools ">
                    <ul class="seachform">
                        <li>@Html.LabelFor(model => model.Account)</li>
                        <li class="scinput">
                            @Html.EditorFor(model => model.Account)
                            @Html.ValidationMessageFor(model => model.Account)
                        </li>
                    </ul>
                </div>

                <div class="tools ">
                    <ul class="seachform">
                        <li>@Html.LabelFor(model => model.Password)</li>
                        <li class="scinput">
                            @Html.PasswordFor(model => model.Password)
                            @Html.ValidationMessageFor(model => model.Password)
                        </li>
                    </ul>
                </div>

                <div class="tools ">
                    <ul class="seachform">
                        <li>@Html.LabelFor(model => model.Phone)</li>
                        <li class="scinput">
                            @Html.PasswordFor(model => model.Phone)
                            @Html.ValidationMessageFor(model => model.Phone)
                        </li>
                    </ul>
                </div>

                <div>
                    <div style="float:left" class="tools ">
                        <ul class="seachform">
                            <li>@Html.LabelFor(model => model.IsActive)</li>
                        </ul>
                    </div>
                    <div style="float:left; ">
                        @Html.RadioButtonList("radStatusIds", ViewBag.lstStatus as IList<SelectListItem>)
                        @Html.Hidden("statusValue")

                    </div>
                </div>
            </fieldset>
            <p> </p>
            <fieldset style="border: 1px dotted #61B5CF; margin-top: 16px; padding: 10px;">
                <legend style="font: bold 1em Arial, Helvetica, sans-serif; color: #00008B; background-color: #FFFFFF;">角色信息</legend>
                <div>
                    @Html.CheckBoxList("ids", ViewBag.lstRole as IList<SelectListItem>)
                    @Html.Hidden("roleIDs")
                </div>
            </fieldset>
            <div style="margin-top:10px;">
                <p>
                    <input type="submit" value="新   增" class="scbtn" onclick="return getValue()" />&nbsp;&nbsp;&nbsp;&nbsp;@Html.ActionLink("返回列表", "Index")
                </p>
            </div>
        }
    </div>
    <script language="javascript" type="text/javascript">
        $(document).ready(function () {

        });
        function getValue() {
            if ($('#Organization').val() == 0) {
                //alert("请选择组织机构！");
                return false;
            }
            var s = "";
            $('input[name="ids"]:checked').each(function () {

                s = s + $(this).val() + ",";
            });
            $('#roleIDs').val(s);
            $('#statusValue').val($('input[name="radStatusIds"]:checked').val());
            $('#studentId').val($('#Stduent').val());
            $('#teacherId').val($('#Teacher').val());
        }
    </script>
</body>

</html>
